package clue.cards;

import clue.enums.Weapon;

/**
 *
 * @author Shawn
 */
public class WeaponCard extends Card{
  private final Weapon weapon;

  public WeaponCard(Weapon weapon) {
    this.weapon = weapon;
  }

  public Weapon getWeapon() {
    return weapon;
  }

  @Override
  public int hashCode() {
    int hash = 7;
    hash = 11 * hash + (this.weapon != null ? this.weapon.hashCode() : 0);
    return hash;
  }

  @Override
  public boolean equals(Object obj) {
    if (!(obj instanceof WeaponCard))
      return false;

    WeaponCard o = (WeaponCard) obj;
    return this.weapon == o.weapon;
  }

  @Override
  public String toString() {
    return this.weapon.toString();
  }

}
